<%@ page language="java" pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<c:set var="ctx" value="${pageContext.request.contextPath}"></c:set>

<!DOCTYPE html>
<html>
<head>
<!-- Standard Meta -->
<c:import url="../common/meda.jsp"></c:import>

<!-- Site Properties -->
<title>我的订单-${sysDesc}</title>
<link rel="stylesheet" type="text/css"
	href="//${static_server }/css/semantic.css">
<link rel="stylesheet" type="text/css"
	href="//${static_server }/css/common.css">

<script src="//${static_server }/js/jquery.min.js"></script>
<script src="//${static_server }/js/semantic.js"></script>
<script src="//${static_server }/js/common.js"></script>
<script src="//${static_server }/js/title_menu.js"></script>
</head>
<body class="pushable">
	<c:import url="../common/title_menu.jsp"></c:import>
	<div class="pusher">
		<div id="infoheadsegment" class="ui vertical raised masthead segment">
			<div class="ui container">
				<div class="ui breadcrumb">
					<a class="section" href="http://${static_server }/"><i
						class="icon home"></i>首页</a>
					<div class="divider">/</div>
					<div class="active section">我的订单</div>
				</div>
			</div>
			<!-- content container end -->
		</div>
		<div id="infobodysegment" class="ui vertical masthead segment">
			<div class="ui container">
				<div class="ui stackable grid">
					<div class="four wide column">
						<c:import url="common.jsp?item=1"></c:import>
					</div>
					<div class="twelve wide column">
						<c:if test="${empty orders }">
							<div class="ui text container">
								<p>您还没有下单，赶快去<a href="//${static_server}/home/product.html">购买</a>吧~~~~</p>
							</div>
						</c:if>
						<c:if test="${not empty orders }">
						<table class="ui padded table">
							<thead>
								<tr>
									<th>订单编号</th>
									<th>支付状态</th>
									<th>应付金额</th>
									<th>激活码</th>
									<th>创建时间</th>
								</tr>
							</thead>
							<tbody>
								<c:forEach var="item" items="${orders }">
								<tr>
									<td>${item.id }</td>
									<td> 
										<c:choose>
										   <c:when test="${item.tradeStatus=='TRADE_FINISHED' || item.tradeStatus=='TRADE_SUCCESS' }">
										   	已支付  
										   </c:when>
										   <c:otherwise> 
										   未支付
										   </c:otherwise>
										</c:choose>
									 </td>
									<td>${item.payMoney }</td>
									<td>${item.sysCode }</td>
									<td>${item.createdDate }</td>
								</tr>
								</c:forEach>
							</tbody>
						</table>
						</c:if>
					</div>
				</div>
			</div>
			<!-- content container end -->
		</div>
		<!-- schoolbodycontainer end -->
		<c:import url="../common/footer.jsp"></c:import>
	</div>
	<!-- pusher end -->
</body>
</html>